import request from '@/utils/request'
const apix = 'dev-api'
// api地址
const api = {
	login_account: apix + '/weLogin',
	wxH5: apix + '/wechatLogin',
	moveLogin: apix + '/moveLogin',
	getWxSign: apix + '/wechat/getWxSign',
	moveRegister: apix + '/moveRegister',
	csLogin: apix + '/login'

}
// 注册
export function moveRegister(obj) {
	return request.post(api.moveRegister, {
		...obj
	})
}

// 测试 账号密码登录
export function csLogin(obj) {
	return request.post(api.csLogin, {
		...obj
	})
}
// 账号密码登录
export function getWxSign(url = '') {
	return request.get(`${api.getWxSign}?url=${url}`)
}
// 账号密码登录
export function loginAccount(obj) {
	return request.post(api.login_account, {
		...obj
	})
}
// 账号密码登录
export function moveLogin(obj) {
	return request.post(api.moveLogin, {
		...obj
	})
}
// moveLogin
// 微信公众号登录
export function wxH5Login(data) {
	return request.get(`${api.wxH5}?code=${data.code}&state=${data.state}`)
}